package ezonsport.android.ui.userRegister_Login;

import ezonsport.android.data.DataHelper;
import ezonsport.android.service.SystemManageService;

public class UserRegisterController {

	private DataHelper dataHelper;
	private SystemManageService systemManageaService;
	
	public UserRegisterController(DataHelper helper){
		this.dataHelper = helper;
		systemManageaService = new SystemManageService(this.dataHelper);
	}
	/**
	 * 
	 * 用户注册
	 * @param email：注册的邮箱
	 * @param pwd：注册的密码
	 * @param confirmPwd：注册的确认密码
	 * @return :返回注册是否成功，以及返回的信息
	 */
	public String Register(String email, String pwd, String confirmPwd){
		 return systemManageaService.register(email, pwd, confirmPwd);
	}
	
	
	/**
	 * 用户登录
	 * @param userName：登录名
	 * @param pwd：登录密码
	 * @return：返回登录成功是否成功
	 */
	public  String  Login(String userName, String pwd){
		return systemManageaService.login(userName, pwd);
	}
}
